const { model } = require("..");

module.exports = {
  up: async (queryInterface, Sequelize) => {
    for (let x in model) {
      const domain = model[x];
      await queryInterface.createTable(domain.table.toUpperCase(), domain.columns);
    }
  },

  down: async (queryInterface, Sequelize) => {
    for (let x in model) {
      const domain = model[x];
      await queryInterface.dropTable(domain.table.toUpperCase());
    }
  }
};
